package com.example.lib_visitor

import com.example.lib_common.mvi.BaseRepository
import com.example.lib_common.mvi.ResponseEntity
import com.example.network_sdk.HttpType
import com.example.network_sdk.NetWorkFactory
import kotlinx.coroutines.flow.Flow

class VisitorRepository : BaseRepository() {
    fun requestAllSpace(map: HashMap<String,Any>) : Flow<ResponseEntity<VisitorEntity>> {
        return NetWorkFactory.factory(HttpType.TOKEN)!!
            .create(ApiService::class.java)
            .requestAddVisitor(createBody(map))
    }
}